public class Test {
    public static void main(String[] args) {
        Animal a=new cat();
        a.move();
        a.talk();
        //给cat赋值
        cat b=new cat();
        b.setAge(10);
        System.out.println("cat的年龄是" + b.getAge());
        b.setName("大华");
        System.out.println("cat的名字是 " + b.getName());
        //给dog赋值
        Animal d=new dog();
        dog c=new dog();
        c.setAge(5);
        System.out.println("dog的年龄是 " + c.getAge());
        c.setName("小王");
        System.out.println("dog的名字是 " + c.getName());
    }
}
